package com.sky.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

//@Component
public class TaskDemo {
    @Scheduled(cron = "0/5 * * * * ?")
    public void printTime(){
        System.out.println("每五秒触发一次"+ LocalDateTime.now());
    }
}
